Advanced Architecting on AWS
Well-Architected Framework β’ Design Principles β’ Global Infrastructure
| Pillar | Focus | Key Question |
|---|---|---|
| Operational Excellence | Run & monitor systems | How do you evolve operations? |
| Security | Protect data & systems | How do you detect & respond to events? |
| Reliability | Recover from failures | How do you manage change & failure? |
| Performance Efficiency | Use resources efficiently | How do you select the right resources? |
| Cost Optimization | Avoid unnecessary costs | How do you manage spending? |
| Sustainability | Minimize environmental impact | How do you reduce downstream impact? |
π
33+ Regions
Geographic areas with multiple isolated data centers
π’
100+ AZs
One or more discrete data centers with redundant power/networking
π‘
600+ Edge Locations
CloudFront PoPs + Regional Edge Caches for low-latency delivery
| Factor | Weight | Example |
|---|---|---|
| Data Sovereignty | High (blocker) | Healthcare β must stay in-country |
| Latency to Users | High | APAC users β ap-southeast-1 |
| Service Features | Medium | New services launch in us-east-1 first |
| Pricing | Low-Medium | SΓ£o Paulo 30-50% more than Virginia |
# List Well-Architected workloads aws wellarchitected list-workloads --query 'WorkloadSummaries[].{Name:WorkloadName,Risk:RiskCounts}' # Get a lens review aws wellarchitected get-lens-review \ --workload-id "abc123def456" \ --lens-alias "wellarchitected" \ --query 'LensReview.PillarReviewSummaries[].{Pillar:PillarName,Risk:RiskCounts}' # List available lenses (WAF, SaaS, Serverless, etc.) aws wellarchitected list-lenses --query 'LensSummaries[].{Name:LensName,ARN:LensArn}'
Q1: Which pillar of the Well-Architected Framework was added most recently (2021)?
A) Security B) Cost Optimization C) Sustainability D) Reliability
Q2: In the Shared Responsibility Model, who is responsible for patching the guest OS on an EC2 instance?
A) AWS B) The customer C) Shared responsibility D) The ISV
Well-Architected Framework
6 pillars: Ops Excellence, Security, Reliability, Perf Efficiency, Cost Optimization, Sustainability
Design Principles
Automate, test at scale, allow evolution, data-driven, game days
Global Infrastructure
33+ Regions, 100+ AZs, 600+ Edge locations. Choose Region by compliance, latency, services, cost.
Key Takeaway
Every architecture decision in this course maps back to these pillars. They're your evaluation framework.
Access S3 from an EC2 in a private subnet β no NAT Gateway needed
Step 1: Create the VPC Gateway Endpoint for S3
# Get your VPC ID and route table ID for the private subnet VPC_ID="vpc-0abc123def456" PRIVATE_RT="rtb-0private123" # Create the S3 Gateway Endpoint aws ec2 create-vpc-endpoint \ --vpc-id $VPC_ID \ --service-name com.amazonaws.us-east-1.s3 \ --route-table-ids $PRIVATE_RT \ --region us-east-1 # Verify β you'll see a new route in your route table (pl-xxxxx β vpce-xxxxx) aws ec2 describe-route-tables --route-table-ids $PRIVATE_RT \ --query "RouteTables[0].Routes[?GatewayId!='local']" --output table
Step 2: Ensure EC2 has an IAM Role with S3 access
# Attach an instance profile with S3 access to your EC2 aws ec2 associate-iam-instance-profile \ --instance-id i-0abc123def456 \ --iam-instance-profile Name=EC2-S3-Access-Role # Or verify existing role aws ec2 describe-instances --instance-ids i-0abc123def456 \ --query "Reservations[0].Instances[0].IamInstanceProfile.Arn"
Step 3: SSH into EC2 and test S3 access
# Connect via SSM (no SSH needed for private instances) aws ssm start-session --target i-0abc123def456 # Once inside the EC2: aws s3 ls # List buckets aws s3 ls s3://my-bucket/ # List objects aws s3 cp s3://my-bucket/file.txt . # Download file echo "Hello from private subnet" > test.txt aws s3 cp test.txt s3://my-bucket/ # Upload file
Step 4: (Optional) Restrict endpoint with policy
# Restrict the endpoint to only allow access to specific buckets
aws ec2 modify-vpc-endpoint --vpc-endpoint-id vpce-0abc123 \
--policy-document '{
"Statement": [{
"Sid": "AllowSpecificBucket",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject", "s3:PutObject", "s3:ListBucket"],
"Resource": [
"arn:aws:s3:::my-bucket",
"arn:aws:s3:::my-bucket/*"
]
}]
}'